KDE associations
KDE’s file and protocol associations and menu entries are based on the xdg system of https://www.freedesktop.org/wiki/Specifications/
Applications are defined for menus and for associations in .desktop
files. They can be edited with a text editor or with specialized tools. Sometimes the specialized tools may remove information, caution!
All special local menu entries and associations should happen in
.local/share/applications
Creating a new file association or modifying an existing one puts the .desktop
file (or its copy) here.
To make a menu entry for a new program, best to first create the desktop file and then copy/paste it into Edit Applications.
File & protocol associations are based on mime types, e.g.
.torrent
file → application/x-bittorrent
magnet:
link → x-scheme-handler/magnet
and specified by the “Mime Type=” field in a .desktop
file.
After settings in desktop files, especially associations, have been changed with a text editor, run
kbuildsycoca5
or maybe
update-mime-database
.